<template>
	<view>
		<view class="main">
			<view class="item">
				<u-button type="primary" @click="toTem_Hum()">温湿度检测</u-button>
			</view>
			<view class="item">
				<u-button type="success" @click="toLight()">灯泡开关</u-button>
			</view>
			<view class="item">
				<u-button type="error" @click="toBluetooth()">蓝牙测试</u-button>
			</view>
			<view class="item">
				<u-button type="warning" @click="toRGBLight()">RGB灯泡</u-button>
			</view>
			<view class="item">
				<u-button type="default" @click="toSetNetwork()">设备配网</u-button>
			</view>
		</view>
		
		<!-- <view style="padding-top: 300rpx;">
			<u-empty text="没有设备"></u-empty>
		</view> -->
		
		<view class="float_area">
			<button class="float_button" plain="true" @click="toSetNetwork()" style="border: none;">
				<image class="button_image" src="../../static/icon/添加_add-one.png"></image>
			</button>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {


			}
		},
		methods: {
			toTem_Hum() {
				uni.navigateTo({
					url: '/pages/devices/tem_hum/index'
				})
			},
			toLight() {
				uni.navigateTo({
					url: '/pages/devices/light/index'
				})
			},
			toBluetooth() {
				uni.navigateTo({
					url: '/pages/devices/bluetooth/index'
				})
			},
			toRGBLight() {
				uni.navigateTo({
					url: '/pages/devices/rgb_light/index'
				})
			},
			toSetNetwork() {
				uni.navigateTo({
					url: '/pages/devices/set_network/index'
				})
			}
		}
	}
</script>

<style>
	.main {
		margin: 0 10px 10px 10px;
	}

	.item {
		margin-top: 10px;
	}

	.float_area {
		position: fixed;
		width: 4rem;
		height: 4rem;
		bottom: 1rem;
		right: 1rem;
		z-index: 9999;
	}

	.float_button {
		line-height: 4rem;
		padding: 0;
	}

	.button_image {
		height: 64px;
		width: 64px;
	}
</style>